package com.sjksy.demo.mapper;

import com.sjksy.demo.domain.TravelMessage;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

/**
* @author guyueyuan
* @description 针对表【travel_message】的数据库操作Mapper
* @createDate 2024-12-11 15:37:03
* @Entity com.sjksy.demo.domain.TravelMessage
*/
@Repository
@Mapper
public interface TravelMessageMapper extends BaseMapper<TravelMessage> {

    @Select("select tr.route_name from travel_message tm,travel_contract tc,travel_route tr " +
            "where tm.travel_contract_id=tc.travel_contract_id " +
            "and tc.route_id=tr.route_id and tm.travel_id=#{travelId}")
    String getRouteName(Integer travelId);
}




